<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页</title>

    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>

    <style>
        body {
            background: url("../img/09e5becdbc6e3ad152851809b4c7f8c7_482x264.jpg") no-repeat center center;
            background-size: cover;
            background-attachment: fixed;
        }

        .login_box {
            width: 300px;
            height: 240px;
            background-color: rgba(20, 18, 18, 0.507);
            text-align: center;
            border-radius: 5px;
            /* margin-left: 1100px; */
            margin-top: 28px;
            position: absolute;
            color: #ffffff;
        }

        input {
            color: #000;
        }

        .login_form_cj {
            margin-top: 10px;
        }

        h2 {
            margin-top: 30px;
            color: #ffffff;

        }

        .btn-outline-primary {
            margin-top: 20px;
            margin-left: 15px;
            margin-right: 15px;
            color: #000;
        }

        .btn-primary {
            margin-top: 20px;
            margin-left: 30px;
            margin-right: 15px;

        }

        .back_img {
            width: 100%;
            height: 100%;
        }

        .forgot_password {
            padding-top: 20px;
            margin-left: 50px;
        }

        .find_password {
            margin-top: 15px;
            margin-left: 148px;

        }

        a {
            color: white;
            text-decoration: none;
        }

        a:hover {
            color: #00a8ff;
            text-decoration: none;
        }

        p {
            margin-left: 617px;
            margin-top: 80px;
            color: #ffffff;
            font-size: 50px;

        }

        .btn:hover {
            box-shadow: 2px 2px 2px 2px #161616;
        }

        .btn:focus {
            outline: 0;
        }
    </style>
</head>

<body>
    <p>juccey的个人主页</p>
    <div class="login_box">
        <h2>登 &nbsp;&nbsp; 录</h2>
        <form action="#" method="post">
            账号：<input type="text" class="login_form_cj" id="id_input" placeholder="账号"> <br>
            密码：<input type="password" class="login_form_cj" id="password_input" placeholder="密码"> <br>
            <button type="button" class="btn btn-primary">登录</button>
            <button type="button" class="btn btn-outline-primary">注册</button>
        </form>
        <div class="find_password">
            <a href="">忘记密码？点我试试...</a>
        </div>
    </div>
    <div class="warning_box" style="width: 230px;height: 50px; background-color: rgba(250, 2, 2, 0.5);border-radius: 5px;
                margin-left: 700px;color: #ffffff; text-align: center;line-height:50px;">
        <span class="warning_span"></span>
    </div>

</body>

<script>
    $(document).ready(function () {

        $("p").animate({
            fontSize: '45px'
        }, "slow");

        $(".login_box").animate({
            left: '1100px'
        }, "slow");

        //设置警告框初始化是隐藏起来
        $(".warning_box").hide();

        // 绑定设置邮箱格式
        $("#id_input").blur(function () {
            if ($("#id_input").val() == "") {

                $(".warning_box").show(1000);
                $(".warning_span").text("邮箱不能为空!");
                return false;
            }
            var email = $("#id_input").val();
            if (!email.match(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/)) {
                $(".warning_span").text("邮箱格式不正确！请重新输入...");
            } else {
                $(".warning_box").hide(1000);
            }
        })

    });
</script>
</script>

</html>